package com.crl.manager.resource
{
	import flash.utils.Dictionary;

	public class ResourceBundle
	{
		private var _bundleName:String;
		
		private var _content:Dictionary
		public function ResourceBundle(name:String,weak:Boolean=false)
		{
			_bundleName=name;
			
			_content=new Dictionary(weak);
		}
		
		public function getObejct(key:String):*{
			return _content[key]
		}
		
		public function setObject(key:String,o:*):void{
			_content[key]=o;
			if(o==null){
				delete _content[key];
			}
		}
		
		public function get name():String{
			return _bundleName;
		}
		
		public function clear():void{
			for(var key:String in _content){
				_content[key]=null;
				delete _content[key];
			}
		}
	}
}